1. Field of the Invention
The embodiments of the invention generally relate to computer storage systems, and more particularly to memory storage techniques implemented in computer data processing systems.
2. Description of the Related Art
Traditional computer systems often maintain a collection of objects in memory which they will create or read from some form of stable storage, modify, search and write to stable storage. These objects may be pages of memory managed by a virtual memory manager, pages of data managed by a relational database system or a number of other types of object.
For each such collection of objects there will be a portion of the computer operating system or application that will be responsible for managing the collection of objects. This portion of the computer operating system is a computer program providing a set of interfaces and data structures that other programs or processes may use to request the allocation of managed objects, to search for managed objects, or to request the privilege to update a managed object, etc. By having all programs or processes interact with the manager of the objects the system can maintain certain guarantees about the objects managed, such as allowing only a single program or process to update an object, or to not allow subsequent updates to occur until a previous update has been saved to stable storage, etc.
It is typical for such managers to provide a method where a program or process can lock an object and for all other programs or processes wanting to read or write this object to be forced to wait until this lock is released until they can perform their read or writes. This lock is typically set when an object has been modified and is not cleared until the object has been written to stable storage. The lock will usually consist of a mark applied to the object which is interpreted to indicate the object is locked.
If a program or process obtains the locks and then modifies a number of objects and holds the locks until the objects have been written to stable storage then it is guaranteed that all of these objects are written to stable storage in a consistent state. This type of consistency guarantee is often critical to future system operation when objects are read back from stable storage and it is important that they are consistent at that time.
The holding of locks on a series of objects for an extended period of time, such as the time often taken to write them to stable storage can become a bottleneck on the performance of the overall system. This is particularly true if one or more objects are used by multiple applications or processes in the system, which will all contend for the lock on these objects and are forced to wait until it is available.
What is required is a method where the consistency guarantee of having a set of objects locked and committed to stable storage with the consistency guarantee that the locks give, is maintained by where other programs or processes are allowed to continuing to read from and modify the objects without being forced to wait.
U.S. Pat. No. 5,715,447 issued to Hayashi et al., the complete disclosure of which is herein incorporated by reference, provides a technique for shortening the delay by copying an object, in the case of this patent an object being a buffer in a database, while it is locked and then releasing the lock immediately. The copy of the object is then written to stable storage while other modifications may be made in the original object by other applications. As such, the '447 patent provides an approach of performing the copy operation on all data that is being committed in order to avoid having any data unavailable during the write operation to stable storage, whether such data is required or not. However, while the '447 patent was adequate for the purposes for which it was designed, there remains a need for a novel system and method of data copying and writing in a memory unit of a computer system which avoids the overhead of making copies of every object that must be committed to stable storage.